import request from '@/utils/request'

// 查询公摊配置表列表
export function listPublicShare(query) {
  return request({
    url: '/datastatistics/publicShare/list',
    method: 'get',
    params: query
  })
}

// 查询公摊配置表详细
export function getPublicShare(id) {
  return request({
    url: '/datastatistics/publicShare/' + id,
    method: 'get'
  })
}

// 新增公摊配置表
export function addPublicShare(data) {
  return request({
    url: '/datastatistics/publicShare',
    method: 'post',
    data: data
  })
}

// 修改公摊配置表
export function updatePublicShare(data) {
  return request({
    url: '/datastatistics/publicShare',
    method: 'put',
    data: data
  })
}

// 删除公摊配置表
export function delPublicShare(id) {
  return request({
    url: '/datastatistics/publicShare/' + id,
    method: 'delete'
  })
}

// 查询公摊配置表列表-不分页
export function getAllPublicShare(query) {
  return request({
    url: '/datastatistics/publicShare/getAll',
    method: 'get',
    params: query
  })
}

export function transferPublicShare(data) {
  return request({
    url: '/datastatistics/publicShare/transferPublicShare',
    method: 'post',
    data: data
  })
}
